package com.wfh.rpc.fault.tolerant;

import com.wfh.rpc.model.RpcResponse;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @Title: FailSafeTolerantStrategy
 * @Author wangfenghuan
 * @Package com.wfh.rpc.fault.tolerant
 * @Date 2025/10/17 08:51
 * @description: 静默处理异常
 */
@Slf4j
public class FailSafeTolerantStrategy implements TolerantStrategy {
    @Override
    public RpcResponse doTolerant(Map<String, Object> context, Exception e) {
        log.info("静默处理异常: {}", e.getCause().toString());
        return new RpcResponse();
    }
}
